package division;
import java.util.*;

/**
 * The Class DivisionOfInteger provides division like long division
 * 
 * @author Mykola Blyk nickblyk@gmail.com
 */

public class DivisionOfInteger {
	static Scanner reader= new Scanner(System.in);
	private static int dividend;
	private static int devisor;
	private static int result;
	private static int modulo;
    
    public static void main(String[] args) {
    	setData();
        computing();
        printResult();
   }
    public static void setData(){
        System.out.println("Set your dividend: ");
        dividend = reader.nextInt();
        System.out.println("Set your divisor: ");
        devisor = reader.nextInt();
        checInputZero();
    }
    private static void checInputZero() {
        while( devisor == 0){
             System.out.println("Some troubbles. Set your divisor: ");
             devisor = reader.nextInt();
        }
    }
    public static void printResult(){
        System.out.println(dividend + " | " +devisor);
        System.out.println("     " +result);
        System.out.println(" " +modulo);       
    }
    public static void computing(){
        result = dividend / devisor;
        modulo = dividend % devisor;
    }
}






